package rkdwogus7.practice;

public class Ch05_Sil1 {

	public static void main(String[] args) {
		
		
	} // main

	
	
} // class

class Printer {
	private String modelName;
	private String maker;
	private String connection;
	private int copy;
	private int usablePaper;
	private int remainsPaper;
	
	
	public Printer(String modelName, String maker, String connection, int copy,
			int usablePaper, int remainsPaper) {
		this.modelName = modelName;
		this.maker = maker;
		this.connection = connection;
		this.copy = copy;
		this.usablePaper = usablePaper;
		this.remainsPaper = remainsPaper;
	}

	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public String getMaker() {
		return maker;
	}

	public void setMaker(String maker) {
		this.maker = maker;
	}

	public String getConnection() {
		return connection;
	}

	public void setConnection(String connection) {
		this.connection = connection;
	}

	public int getCopy() {
		return copy;
	}

	public void setCopy(int copy) {
		this.copy = copy;
	}

	public int getUsablePaper() {
		return usablePaper;
	}

	public void setUsablePaper(int usablePaper) {
		this.usablePaper = usablePaper;
	}

	public int getRemainsPaper() {
		return remainsPaper;
	}

	public void setRemainsPaper(int remainsPaper) {
		this.remainsPaper = remainsPaper;
	}
	
//	public void print() {
//		for(int i = usablePaper; i > 0; --i) {
//			usablePaper = usablePaper - 1;
//		} // print() method 실행 시 마다 인쇄용지 1매 감소. i가 커지다가 종이매수보다 커지면 종이는 0장인 거니까 이렇게 하면 되나...
//	}

	@Override
	public String toString() {
		return "Printer [modelName=" + modelName + ", maker=" + maker
				+ ", connection=" + connection + ", copy=" + copy
				+ ", usablePaper=" + usablePaper + ", remainsPaper="
				+ remainsPaper + "]";
	}
	
	
	
}

class InkjetPrinter extends Printer {
	private String remainsInk;

	public InkjetPrinter(String modelName, String maker, String connection,
			int copy, int usablePaper, int remainsPaper, String remainsInk) {
		super(modelName, maker, connection, copy, usablePaper, remainsPaper);
		this.remainsInk = remainsInk;
	}

	public String getRemainsInk() {
		return remainsInk;
	}

	public void setRemainsInk(String remainsInk) {
		this.remainsInk = remainsInk;
	}

	@Override
	public String toString() {
		return "InkjetPrinter [remainsInk=" + remainsInk + "]";
	}
	
	
}

class LaserPrinter extends Printer {
	private String remainsToner;

	public LaserPrinter(String modelName, String maker, String connection,
			int copy, int usablePaper, int remainsPaper, String remainsToner) {
		super(modelName, maker, connection, copy, usablePaper, remainsPaper);
		this.remainsToner = remainsToner;
	}

	public String getRemainsToner() {
		return remainsToner;
	}

	public void setRemainsToner(String remainsToner) {
		this.remainsToner = remainsToner;
	}

	@Override
	public String toString() {
		return "LaserPrinter [remainsToner=" + remainsToner + "]";
	}
	
//	public void print() {
//		for (int i = 0; i < getUsablePaper(); ++i) {
//			//usablePaper = getUsablePaper - 1;     // 이거 도대체 어떻게 해야 하는 것인가...
//		}
//	}
	
}

// Interface PrinterService {
// 	void print(  );
// }













